/*
 * @Description: 账号信息管理
 * @Author: mengjiajun
 * @Date: 2023-12-15 13:13:05
 * @LastEditors: mengjiajun
 * @LastEditTime: 2023-12-15 14:10:01
 * @FilePath: \foodstuff-safety-responsibility\src\pages\User\components\AccountManagement\index.tsx
 */

import { Icon } from "@antmjs/vantui";
import { View, Text, Input } from "@tarojs/components";
import { useState } from "react";
import Taro from "@tarojs/taro";

const AccountManagement: React.FC = () => {
  const [companyName, setCompanyName] = useState("食品安全企业1");
  return (
    <View className="w-full h-[100vh] bg-[#e2e2e2]">
      <View className="w-full px-3 bg-white">
        <View className="h-[80px] flex justify-between items-center gap-3 border-b-2 border-solid border-[#e2e2e2]">
          <Text>企业名称</Text>
          <View className="flex-1 text-right">
            <Input className="h-full" value={companyName} />
          </View>
        </View>
        <View
          className="h-[80px] flex justify-between items-center gap-3 border-b-2 border-solid border-[#e2e2e2]"
          onClick={() => {
            Taro.navigateTo({
              url: "/pages/User/components/AccountManagement/components/EditPhone/index",
            });
          }}
        >
          <Text>手机号</Text>
          <View className="flex justify-end flex-1 gap-3">
            <Text>12345678901</Text>
            <Icon name="arrow" size={40}></Icon>
          </View>
        </View>
        <View
          className="h-[80px] flex justify-between items-center gap-3 border-b-2 border-solid border-[#e2e2e2]"
          onClick={() => {
            Taro.navigateTo({
              url: "/pages/User/components/AccountManagement/components/EditLicenseNumber/index",
            });
          }}
        >
          <Text>许可证号</Text>
          <View className="flex justify-end flex-1 gap-3">
            <Text>test123</Text>
            <Icon name="arrow" size={40}></Icon>
          </View>
        </View>
      </View>
      <Text className="h-[80px] flex items-center bg-[#e2e2e2] px-3 text-[24px]">
        手机号和许可证号均可登录
      </Text>

      <View
        className="h-[80px] flex justify-between items-center gap-3 border-[#e2e2e2] px-3 bg-white"
        onClick={() => {
          Taro.navigateTo({
            url: "/pages/User/components/AccountManagement/components/EditPassword/index",
          });
        }}
      >
        <Text>修改密码</Text>
        <View className="flex justify-end flex-1 gap-3">
          <Icon name="arrow" size={40}></Icon>
        </View>
      </View>
    </View>
  );
};

export default AccountManagement;
